package com.atguigu.flink.chapter05.source;


import org.apache.flink.configuration.Configuration;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author liuyun
 * @title: Flink02_Source_File
 * @projectName flink0924
 * @description: TODO
 * @date 2022-3-1 22:39
 */
public class Flink02_Source_File {
    public static void main(String[] args) {
        Configuration conf = new Configuration();

        conf.setInteger("rest.port", 2000);

        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(conf);
        env.readTextFile("hdfs://hadoop162:8020/README.txt").print();
        try {
            env.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
